<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout::head('首页')">
    <style th:inline="text">
        body{
            background: url("[[@{/}]]img/2.jpg");
        }
    </style>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="~{layout::header}"></div>
<div class="container" style="margin-left:400px">
<table class="table table-hover" border="1" width="1000">
    <tr>
        <th> 类别id</th> <th>类别名称</th>    <th>操作</th> <th>操作</th>
    </tr>

    <tr th:each="cat : ${list}">
        <th scope="row" th:text="${cat.getId()}">id未知</th>
        <td th:text="${cat.getName()}">名称未知</td>

        <td><a th:href="@{/category/edit/{id}(id=${cat.getId()})}">编辑</a></td>
        <td><a th:href="@{/category/delete/{id}(id=${cat.getId()})}">删除</a></td>
    </tr>

    <a  href="/category/list"  >回到首页</a></br></br></br>
</table>
</div>
</body>
</html>